import ToolActionApi from "@/tool/http/tool-action.js";
import attributeVue from "./components/attribute.vue";

let channelAction = ToolActionApi.init("function_channel_business");

let thingsServiceAction = ToolActionApi.init("things_service");

const rule = {
  queryParams: [],
  metadata: [
    { name: "id" },
    {
      name: "channel_id",
      memo: "渠道信息",
      dictListFun: async () => {
        return await channelAction.dict();
      },
    },
    {
      memo: "属性配置",
      component: attributeVue,
    },
    {
      name: "services",
      multiple: true,
      dictListFun: async () => {
        return await thingsServiceAction.dict();
      },
    },
  ],
};

export default async function () {
  return rule;
}
